-module(measure).

-include("alpha.class.hrl").
-include("beta.class.hrl").
-include("gamma.class.hrl").
-include("delta.class.hrl").
-include("epsilon.class.hrl").
-include("zeta.class.hrl").

-include("rw10.class.hrl").
-include("rw20.class.hrl").
-include("rw30.class.hrl").
-include("rw40.class.hrl").
-include("rw50.class.hrl").
-include("rw60.class.hrl").
-include("rw70.class.hrl").
-include("rw80.class.hrl").
-include("rw90.class.hrl").
-include("rw100.class.hrl").

-define(SYSTEM, "ECT1 classes").
-define(SYSTEM_SHORT, "ect1").

-define(CLASSES, [alpha, beta, gamma, delta, epsilon, zeta]).
-define(CLASSES2, [rw10, rw20, rw30, rw40, rw50, rw60, rw70, rw80, rw90, rw100]).
-define(CATEGORIES, [calltest, readtest, writetest]).
%-define(CATEGORIES, [calltest, readtest, writetest, {readtest2, ?CLASSES2}, {writetest2, ?CLASSES2}]).

-define(OPS100k, 10).

-include("../measure.hrl").



readtest(Obj) ->
    #alpha{field1 = A} = Obj,
    A.

writetest(Obj1) ->
    Obj1#alpha{field1 = 1}.


readtest2(Obj) ->
    #rw10{f2 = A} = Obj,
    A.

writetest2(Obj1) ->
    Obj1#rw10{f2 = 1}.


calltest(Obj) ->
    {Obj}:method1().

init_object(alpha) -> #alpha{field1 = 1, field2 = 2, field3 = 3, field4 = 4};
init_object(beta) -> #beta{field1 = 1, field2 = 2, field3 = 3, field4 = 4};
init_object(gamma) -> #gamma{field1 = 1, field2 = 2, field3 = 3, field4 = 4};
init_object(delta) -> #delta{field1 = 1, field2 = 2, field3 = 3, field4 = 4};
init_object(epsilon) -> #epsilon{field1 = 1, field2 = 2, field3 = 3, field4 = 4};
init_object(zeta) -> #zeta{field1 = 1, field2 = 2, field3 = 3, field4 = 4};

init_object(rw10) -> #rw10{f1 = 42};
init_object(rw20) -> #rw20{};
init_object(rw30) -> #rw30{};
init_object(rw40) -> #rw40{};
init_object(rw50) -> #rw50{};
init_object(rw60) -> #rw60{};
init_object(rw70) -> #rw70{};
init_object(rw80) -> #rw80{};
init_object(rw90) -> #rw90{};
init_object(rw100) -> #rw100{}.

dispose_object(_) ->
    ok.